#include "BubbleSort.h"


void
Bubble_sort(int* array, int a_size)
{
	register int i, j, tmp;
	char F = false;

	for (i = 0; i < a_size; ++i) {
		for (j = 1; j < a_size - i; ++j) {
			if (array[j] < array[j-1]) {
				tmp = array[j];
				array[j] = array[j-1];
				array[j-1] = tmp;
				F = true;
			}
		}
		if (!F)
			break;
		F = false;
	}
}
